package com.sgb.goods.view.adapter;

import androidx.databinding.ViewDataBinding;

import com.chad.library.adapter.base.BaseViewHolder;
import com.sgb.goods.BR;
import com.sgb.goods.R;
import com.sgb.goods.entity.GoodsManageListEntity;
import com.sgb.goods.utils.base.adapter.BaseCommonAdapter;

/**
 * 商品管理列表适配器
 * @author cyj
 */
public class GoodsManageListAdapter extends BaseCommonAdapter<GoodsManageListEntity> {

    public GoodsManageListAdapter() {
        super(R.layout.goods_item_goods_manage_list, BR.viewModel);
    }

    @Override
    protected void convert(BaseViewHolder baseHolder, ViewDataBinding dataBinding, GoodsManageListEntity entity) {
        // 设置按钮监听
        baseHolder.addOnClickListener(R.id.edit_view)
                .addOnClickListener(R.id.up_view)
                .addOnClickListener(R.id.down_view)
                .addOnClickListener(R.id.del_view);

    }
}
